﻿namespace AsyncLog
{
	using System;
	using System.Windows.Forms;

	using PugLib.UI;

	public sealed partial class Closer : Form
	{
		public Closer()
		{
			InitializeComponent();
		}

		private void Timer1Tick(Object sender, EventArgs e)
		{
			Close();
		}

		private void CloserShown(Object sender, EventArgs e)
		{
			timer1.Start();
			timer2.Start();

			using (CloserChild form = FormFactory.Create<CloserChild>())
			{
				FormFactory.ShowDialog(this, form);
			}
		}

		private void Timer2Tick(Object sender, EventArgs e)
		{
			label1.Text = Guid.NewGuid().ToString();
		}
	}
}